actor ZombieSniper : RGAMonster
{
  spawnid 4
  obituary "%o was sniped by a zombieman."
  health 40
  radius 20
  height 56
  mass 100
  speed 8
  painchance 200
  seesound "grunt/sight"
  painsound "grunt/pain"
  deathsound "grunt/death"
  activesound "grunt/active"
  DropItem "SniperRifleSpawner" 15
  DropItem "SniperAmmo" 160
  DropItem "SniperAmmo" 30
  DropItem "HandgunAmmo" 128
  MONSTER
  +FLOORCLIP
  +MISSILEEVENMORE
  states
  {
  Spawn:
    ZHRT A 0 
    ZHRT A 0 A_GiveInventory("XPAmount",random(5, 10))
	ZHRT A 0 Thing_SetSpecial(0,226,613,0,random(5,10))
	POSS P 0 ACS_ExecuteAlways(651,0,0,0,0)
    ZHRT AB 10 A_Look
    goto Spawn+4
  See:
    ZHRT AABBCCDD 4 A_Chase
    loop
  Missile:
    ZHRT E 0 A_JumpIfCloser(600,"Pistol")
    ZHRT E 0 A_FaceTarget
    ZHRT E 30 A_FaceTarget
    ZHRT E 0 A_JumpIfCloser(300,"Pistol")
    ZHRT E 0 A_FaceTarget
    ZHRT E 30 A_FaceTarget
    ZHRT E 0 A_PlaySound("barrett/fire", CHAN_WEAPON, 1.0, false, 0.6)
    ZHRT E 0 A_Jump(83,3)
    ZHRT F 10 BRIGHT A_CustomBulletAttack(0.8, 0.8, 1, 35, "SniperPuff", 9999)
    ZHRT E 0 A_Jump(256,2)
    ZHRT F 10 BRIGHT
    ZHRT E 0 A_Jump(30, "See")
    ZHRT E 0 A_SpidRefire
    goto Missile+3
  Pistol:
    ZHRT E 10 A_FaceTarget
    ZHRT F 8 A_CustomBulletAttack(22.5, 0, 1, 4, "BulletPuff")
    ZHRT E 0 A_PlaySound("u45/fire")
    ZHRT E 8
    goto See
  Pain:
    ZHRT G 3
    ZHRT G 3 A_Pain
    goto See
  Death:
    ZHRT H 0
	ZHRT H 0 A_JumpIfHealthLower(random(-500,-110),"XDeath")
    ZHRT I 5 A_Scream
    ZHRT J 5 A_NoBlocking
    ZHRT J 0 ACS_ExecuteAlways(648,0,0,0,0)
    ZHRT KK 2 A_SpawnItemEx("HealthBonus",0,0,0,random(-2,2),random(-2,2),random(1,4),0,0,0)
    ZHRT L -1
    stop
  XDeath:
    ZHRT O 5
    ZHRT P 5 A_XScream
    ZHRT Q 5 A_NoBlocking
    ZHRT Q 0 ACS_ExecuteAlways(648,0,0,0,0)
    ZHRT RTUV 5
    ZHRT W -1
    Stop
  Raise:
    ZHRT K 1 A_GiveInventory("BlueArmor",200)
    ZHRT KJIH 5
    goto See
  }
}
